using System;

[AttributeUsage(AttributeTargets.Property, AllowMultiple = false, Inherited = false)]
public class FieldImportAttribute : Attribute
{
    public readonly string SourceField = String.Empty;
    public readonly FieldConversionType ConversionType = FieldConversionType.None;

    public enum FieldConversionType
    {
        None,
        IntegerToString,
        StringToPhoneNumber,
        Lookup,
        PersistentLookup,
        Boolean,
        Enum
    }

    public FieldImportAttribute(string source)
    {
        this.SourceField = source;
        this.ConversionType = FieldConversionType.None;
    }

    public FieldImportAttribute(string source, FieldConversionType type)
    {
        this.SourceField = source;
        this.ConversionType = type;
    }


    public FieldImportAttribute(FieldConversionType type)
    {
        this.ConversionType = type;
    }

    public FieldImportAttribute()
    {
        this.ConversionType = FieldConversionType.None;
    }
}
